code_dir="/home/code/RuoYi-Vue-Plus"
git pull origin main
docker stop ruoyi-server && docker rm ruoyi-server && docker rmi ruoyi/ruoyi-admin:4.5.0
mvn clean package -D maven.test.skip=true -P prod
cd ${code_dir}/ruoyi-ui && npm install -d --registry=https://registry.npmmirror.com && npm run build:prod
rm -rf ${code_dir}/script/docker/docker/nginx/html/*
mv ${code_dir}/ruoyi-ui/dist/* ${code_dir}/script/docker/docker/nginx/html/
cp ${code_dir}/script/docker/nginx/cert/* ${code_dir}/script/docker/docker/nginx/cert/
cp ${code_dir}/script/docker/nginx/conf/* ${code_dir}/script/docker/docker/nginx/conf/
cd ${code_dir}/script/docker
docker compose up -d ruoyi-server nginx-web
